//
//  THJMyDianjiaOrderCell.m
//  THJXHW
//
//  Created by 河南德艺 on 2018/9/18.
//  Copyright © 2018年 河南德艺. All rights reserved.
//

#import "THJMyDianjiaOrderCell.h"

@implementation THJMyDianjiaOrderCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.btn.layer.borderWidth = 0.5;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}
-(void)setContentWithDic:(NSDictionary*)dic{
    NSString * status = dic[@"status"];
    if([status isEqual:@"0"]){
        status = @"审核中";
    }else if([status isEqual:@"1"]){
      status = @"对接成功";
        self.quxiaoBtn.hidden = YES;
    }else if([status isEqual:@"2"]){
        status = @"已完成";
    }else if([status isEqual:@"-1"]){
        status = @"已撤单";
    }else if([status isEqual:@"-2"]){
        status = @"已失效";
    }
    self.number.text = [NSString stringWithFormat:@"订单编号:%@",dic[@"order_sn"]];
    self.status.text = status;
    self.name.text = [NSString stringWithFormat:@"%@",dic[@"pro_name"]];
    self.guige.text = [NSString stringWithFormat:@"%@",dic[@"guige"]];
    self.totalPrice.text = [NSString stringWithFormat:@"保证金:¥%@",dic[@"fee"]];
    self.time.text = [NSString stringWithFormat:@"%@",dic[@"add_time"]];
    self.price.text = [NSString stringWithFormat:@"¥%@",dic[@"price"]];
    self.amount.text = [NSString stringWithFormat:@"共%.1f吨",[dic[@"number"] floatValue]];
}
@end
